global stock, foundation, equal, currentsel, getlist, godlist, basecard
on beginSprite me
if listp(foundation) = 0 then
foundation = [:]
end if
row = determinerow()
foundation.addProp(row, new(script("card pile")))
basecard = "ace"
end
on determinerow me
if spriteNum = 11 then
return #fone
else
if spriteNum = 12 then
return #ftwo
else
if spriteNum = 13 then
return #fthree
else
if spriteNum = 14 then
return #ffour
end if
end if
end if
end if
end
on mouseEnter me
if getlist <> VOID then
if sprite(spriteNum).member = member("empty", "playing cards") then
if getlist.getlastcard().rank = basecard then
equal = 1
currentsel = spriteNum
godlist = foundation[row]
end if
else
if sprite(spriteNum).member <> member("empty", "playing cards") then
if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
equal = 1
currentsel = spriteNum
godlist = foundation[row]
else
if (getlist.getlastcard().rank = "ace") and (foundation[row].getlastcard().rank = "king") and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then